package cn.edu.tju.core.security.rest.dto;

import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;

/**
 * DTO for password change with old password verification.
 */
public class PasswordChangeDto {

   @NotNull
   @Size(min = 4, max = 100)
   private String oldPassword;

   @NotNull
   @Size(min = 4, max = 100)
   private String newPassword;

   public String getOldPassword() {
      return oldPassword;
   }

   public void setOldPassword(String oldPassword) {
      this.oldPassword = oldPassword;
   }

   public String getNewPassword() {
      return newPassword;
   }

   public void setNewPassword(String newPassword) {
      this.newPassword = newPassword;
   }

   @Override
   public String toString() {
      return "PasswordChangeDto{" +
         "oldPassword='[HIDDEN]'" +
         ", newPassword='[HIDDEN]'" +
         '}';
   }
}
